#/bin/sh
echo "正在下载客户端..."
curl -L https://github.com/nezhahq/agent/releases/download/v1.0.2/nezha-agent_linux_amd64.zip -o nezha-agent.zip
apt install -y unzip
unzip -d nezha nezha-agent.zip
cd ./nezha
echo "正在下载配置文件..."
curl -Ls https://gitee.com/ewaimp/shell/raw/master/nezha-client.yml -o config.yml
echo "nezha-client.yml 下载完毕..."
apt install uuid-runtime
echo "生成uuid..."
sed -i "s/uuidgen/`uuidgen`/g" config.yml
echo "uuid 生成完成"
echo "安装分屏..."
apt install -y tmux
tmux new -s jiankong
